// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch.Nodes
{
	public sealed class NodesHotThreadsRequestParameters : RequestParameters<NodesHotThreadsRequestParameters>
	{
		[JsonIgnore]
		public bool? IgnoreIdleThreads { get => Q<bool?>("ignore_idle_threads"); set => Q("ignore_idle_threads", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Duration? Interval { get => Q<Elastic.Clients.Elasticsearch.Duration?>("interval"); set => Q("interval", value); }

		[JsonIgnore]
		public long? Snapshots { get => Q<long?>("snapshots"); set => Q("snapshots", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

		[JsonIgnore]
		public long? Threads { get => Q<long?>("threads"); set => Q("threads", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("timeout"); set => Q("timeout", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.ThreadType? Type { get => Q<Elastic.Clients.Elasticsearch.ThreadType?>("type"); set => Q("type", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.ThreadType? Sort { get => Q<Elastic.Clients.Elasticsearch.ThreadType?>("sort"); set => Q("sort", value); }
	}

	public sealed partial class NodesHotThreadsRequest : PlainRequestBase<NodesHotThreadsRequestParameters>
	{
		public NodesHotThreadsRequest()
		{
		}

		public NodesHotThreadsRequest(Elastic.Clients.Elasticsearch.NodeIds? node_id) : base(r => r.Optional("node_id", node_id))
		{
		}

		internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesHotThreads;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		[JsonIgnore]
		public bool? IgnoreIdleThreads { get => Q<bool?>("ignore_idle_threads"); set => Q("ignore_idle_threads", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Duration? Interval { get => Q<Elastic.Clients.Elasticsearch.Duration?>("interval"); set => Q("interval", value); }

		[JsonIgnore]
		public long? Snapshots { get => Q<long?>("snapshots"); set => Q("snapshots", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

		[JsonIgnore]
		public long? Threads { get => Q<long?>("threads"); set => Q("threads", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Duration? Timeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("timeout"); set => Q("timeout", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.ThreadType? Type { get => Q<Elastic.Clients.Elasticsearch.ThreadType?>("type"); set => Q("type", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.ThreadType? Sort { get => Q<Elastic.Clients.Elasticsearch.ThreadType?>("sort"); set => Q("sort", value); }
	}

	public sealed partial class NodesHotThreadsRequestDescriptor : RequestDescriptorBase<NodesHotThreadsRequestDescriptor, NodesHotThreadsRequestParameters>
	{
		internal NodesHotThreadsRequestDescriptor(Action<NodesHotThreadsRequestDescriptor> configure) => configure.Invoke(this);
		public NodesHotThreadsRequestDescriptor()
		{
		}

		internal override ApiUrls ApiUrls => ApiUrlsLookups.NodesHotThreads;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		public NodesHotThreadsRequestDescriptor IgnoreIdleThreads(bool? ignoreIdleThreads = true) => Qs("ignore_idle_threads", ignoreIdleThreads);
		public NodesHotThreadsRequestDescriptor Interval(Elastic.Clients.Elasticsearch.Duration? interval) => Qs("interval", interval);
		public NodesHotThreadsRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
		public NodesHotThreadsRequestDescriptor Snapshots(long? snapshots) => Qs("snapshots", snapshots);
		public NodesHotThreadsRequestDescriptor Sort(Elastic.Clients.Elasticsearch.ThreadType? sort) => Qs("sort", sort);
		public NodesHotThreadsRequestDescriptor Threads(long? threads) => Qs("threads", threads);
		public NodesHotThreadsRequestDescriptor Timeout(Elastic.Clients.Elasticsearch.Duration? timeout) => Qs("timeout", timeout);
		public NodesHotThreadsRequestDescriptor Type(Elastic.Clients.Elasticsearch.ThreadType? type) => Qs("type", type);
		public NodesHotThreadsRequestDescriptor NodeId(Elastic.Clients.Elasticsearch.NodeIds? node_id)
		{
			RouteValues.Optional("node_id", node_id);
			return Self;
		}

		protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
		{
		}
	}
}